package com.pocket.insight.base.context;

import com.alibaba.ttl.TransmittableThreadLocal;

/**
 * 描述：
 *
 * @author shuize
 * @create 2024/11/29
 */
public class RequestIdContext {

    private static TransmittableThreadLocal<String> requestIdThreadLocal = new TransmittableThreadLocal();

    public static void remove() {
        requestIdThreadLocal.remove();
    }

    public static String getRequestId() {
        return (String)requestIdThreadLocal.get();
    }

    public static void setRequestId(String requestId) {
        requestIdThreadLocal.set(requestId);
    }

}
